#ifndef _SETTINGCONFIGUI_H_
#define _SETTINGCONFIGUI_H_


#include "lvgl.h"
#include <functional>
#include <string>
#include <vector>

namespace SettingUI
{
    enum ConfigItemType
    {
        Config_Number = 0,
        Config_String,
    };

    struct ConfigItemInfo
    {   
        std::string name;
        std::string nameZh;
        ConfigItemType type;

        int value;
        std::string string;
    };

    using GetConfigCb = std::function<void(void)>;
    using SaveConfigCb = std::function<bool(int, std::vector<ConfigItemInfo>&)>;

    lv_obj_t *createConfigUI(lv_obj_t *parent, lv_font_t *fontText);
    void releaseConfigUI(void);

    std::vector<ConfigItemInfo> *getPageConfigItemVector(int pageIndex);

    int addConfigPage(std::string &name);
    void addConfigItem(int pageIndex, ConfigItemInfo &info);

};











#endif
